package action;

import java.util.Date;

import action.base.BaseAction;

public class ExperienceAction extends BaseAction  {
	private Date[] beginTime;
	private Date[] endTime;
	private String[] ejaddress;
	private int[] job;
	public Date[] getBeginTime() {
		return beginTime;
	}
	public void setBeginTime(Date[] beginTime) {
		this.beginTime = beginTime;
	}
	public Date[] getEndTime() {
		return endTime;
	}
	public void setEndTime(Date[] endTime) {
		this.endTime = endTime;
	}
	public String[] getEjaddress() {
		return ejaddress;
	}
	public void setEjaddress(String[] ejaddress) {
		this.ejaddress = ejaddress;
	}
	public int[] getJob() {
		return job;
	}
	public void setJob(int[] job) {
		this.job = job;
	}
	public String execute() throws Exception{
		mgex.delAllInfo();
		for(int i=0;i<beginTime.length;i++){
			if(beginTime[i] == null){
				break;
			}
			mgex.addExperienceManager(beginTime[i], endTime[i], ejaddress[i], job[i]);
		}
		return "success";
	}
}
